package yueyong.salarymanagement.module.business.salary.service;


import org.springframework.stereotype.Service;
import yueyong.salarymanagement.module.business.salary.dao.UserMapper;
import yueyong.salarymanagement.module.business.salary.domain.entity.UserEntity;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserService {

    @Resource
    private UserMapper userMapper;

    public UserEntity getOpenid(String openid) {
        return userMapper.getOpenid(openid);
    }

    public List<UserEntity> getUserEntityFromPhoneNumber(String phone) {
        return userMapper.getUserEntityFromPhoneNumber(phone);
    }

    public int insert(UserEntity userEntity) {
        return userMapper.insert(userEntity);
    }

    public int update(UserEntity userEntity) {
        return userMapper.update(userEntity);
    }

    public int register(String openid, String phone, String email) {
        return userMapper.register(openid, phone, email);
    }

}
